package org.liuyunfeng.web;

import org.liuyunfeng.feign.HelloFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: TanJingyu
 * @create: 2022-03-16 14:33
 **/
@RestController
@RequestMapping("/hello")
public class HelloController {
    @Autowired
    private HelloFeign feign;

    @GetMapping
    public String hello() {
        return "hello...";
    }

    @GetMapping("/feign")
    public Object helloFeign() {
        return feign.hello();
    }
}

    